package com.gollum.system.domain.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.gollum.common.domain.response.BaseResponse;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 登录信息响应对象
 *
 * @author Herther
 * @createTime 2022年09月12日 15:07:00
 * @since 1.0.0
 */
@Getter
@Setter
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@ToString
@ApiModel(value = "登录信息响应对象")
public class SysLogininforResponse extends BaseResponse {

    private static final long serialVersionUID = 1L;

    /**  用户登录的账号 **/
    @ApiModelProperty(value = "用户登录的账号",name = "username")
    private String username;

    /** 登录来源 设备 **/
    @ApiModelProperty(value = "登录来源 设备",name = "sourceType")
    private String sourceType;

    /** 操作系统 **/
    @ApiModelProperty(value = "操作系统",name = "os")
    private String os;

    /** 登录的ip地址 **/
    @ApiModelProperty(value = "登录的ip地址",name = "ipAddress")
    private String ipAddress;

    /** 登录的地点 **/
    @ApiModelProperty(value = "登录的地点",name = "ipLocation")
    private String ipLocation;

    /** 返回的消息 **/
    @ApiModelProperty(value = "返回的消息",name = "message")
    private String message;

    /** 登录的状态 0正常 1失败 **/
    @ApiModelProperty(value = "登录的状态 0正常 1失败",name = "status")
    private String status;

    /** 访问登录的时间 **/
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "访问登录的时间",name = "loginTime")
    private Date loginTime;


}
